package com.yxp423.ssmempl.utils.base;

import cn.hutool.core.util.ObjectUtil;
import lombok.*;

/**
 * @Description: java类作用描述
 * @Author: yxp
 * @CreateDate: 2019-04-20 22:32
 * @Version: 1.0
 */

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class AjaxResult {

    /**
     * 成功默认返回内容
     */
    public static final String RET_SUCCESS_MESSAGE = "响应成功";

    public static final String SUCCESS = "200";
    public static final String NOT_FOUND = "404";
    public static final String ERROR = "500";
    public static final String REJECT = "405";
    private boolean success;
    private String msg;
    private String StatusCode;
    private Object data;


    public AjaxResult success(String message,Object data){

        AjaxResult result = new AjaxResult();
        result.setStatusCode(SUCCESS);
        result.setSuccess(true);
        return result;
    }

}
